/**
 * 菜单和路由配置
 */
import { Route, RouterTypes } from '@ant-design/pro-layout/lib/typings';

const routes: Partial<RouterTypes<Route>> = {
  route: {
    path: '/',
    routes: [
      {
        path: '/welcome',
        name: '欢迎',
        icon: 'SmileOutlined',
        component: '/welcome',
      },
      {
        path: '/car',
        name: '车辆管理',
        icon: 'CarOutlined',
        routes: [
          {
            path: '/car/sale',
            icon: 'CloudDownloadOutlined',
            name: '销售情况',
            component: '/car/sale',
            routes: [
              {
                path: '/car/sale/detail',
                icon: 'HeartOutlined',
                name: '销售详情',
                hideInMenu: true,
                component: '/car/sale/detail',
              },
            ],
          },
          {
            path: '/car/serial',
            icon: 'FileDoneOutlined',
            name: '车型',
            component: '/car/serial',
          },
        ],
      },
      {
        path: '/user',
        name: '用户管理',
        icon: 'UserOutlined',
        routes: [
          {
            path: '/user/list',
            name: '用户列表',
            icon: 'CodeOutlined',
            component: '/user/list',
          },
          {
            path: '/user/group',
            name: '用户分组',
            icon: 'BarsOutlined',
            component: '/user/group',
          },
        ],
      },
      {
        path: 'https://www.lixiang.com',
        name: '理想官网',
        icon: 'https://bpic.51yuansu.com/pic3/cover/01/62/72/5955cf52893a9_610.jpg',
      },
    ],
  },
};

export default routes;
